package org.gpp.proj1.util;

import org.gpp.proj1.util.test.JMETestCase;

/**
 * Tests for the model factory class
 * 
 * @author Paolo Victor, paolovictor@gmail.com
 */
public class ModelFactoryTest extends JMETestCase {
	
	public void tearDown() {
		ModelFactory.getInstance().resetModels();
	}
	
	public void testGetModel() {
		// Assert an existing model may be loaded
		assertTrue( ModelFactory.getInstance().getModel( "test/model/bike.3ds" ) != null );
		
		// Invoke a second time to check if there are any problems
		// with the reuse
		assertTrue( ModelFactory.getInstance().getModel( "test/model/bike.3ds" ) != null );

		// Testing for non-existing files
		assertTrue( ModelFactory.getInstance().getModel( "Idonotexist.3ds" ) == null );
	}
}
